function UpdateCalendarMenu( o )
{
    var oRow;
    var oCalendarViews = o.parentElement.rows;
    var iLen = oCalendarViews.length;

    for (var i = 0; i < iLen; i++)
    {
        oRow = oCalendarViews[i];

        if (oRow.id != o.id)
        {
        oRow.firstChild.className = "ms-crm-CalendarViews";
        }
    }
    o.firstChild.className = "ms-crm-CalendarView-Selected";
}

function getHomeCalendarElements( )
{
    var rVal = new Object();

    var oHomeCalendarBody = window.frameElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
    var oMainTable = oHomeCalendarBody.firstChild.rows[0].cells[0].firstChild;

    rVal.oTitle = oMainTable.rows[0].cells[0].firstChild;

    var oRightSideCell = oMainTable.rows[1].cells[0].firstChild.rows[0].cells[1];

    rVal.oMiniCalendar = oRightSideCell.children[0];

    rVal.oMonthMenuItem  = oRightSideCell.children[3].rows[0];
    rVal.oWeekMenuItem  =  oRightSideCell.children[3].rows[1];
    rVal.oDayMenuItem  =   oRightSideCell.children[3].rows[2];

    return rVal;
}